/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//package martino;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

/**
 *
 * @author sempere
 */
public class Combinations {

    public class CombinationComparator implements Comparator<Combination> {

        @Override
        public int compare(Combination o1, Combination o2) {
            return o2.elements.size() - o1.elements.size();
        }
    }
    
    ArrayList<Combination> elementCombinations;
    
    public Combinations(){
        elementCombinations = new ArrayList<Combination>();
    }
    
    public void sort(){
        Collections.sort(elementCombinations, new CombinationComparator());        
    }
    
}
